<template>
  <div class="share">
    <div class="page-head" @click="goBack">
      <div class="back-content">
        <span class="icon iconfont back">&#xe6dc;</span>
      </div>
      <div class="page-head-title">SHARE</div>
    </div>
    <div
      class="page-bc"
      :style="{ backgroundImage: 'url(' + selectImg + ')' }"
    ></div>
    <div share class="page-content">
      <div share class="swiper-content">
        <div class="uni-swiper-wrapper">
          <div class="uni-swiper-slides" style="inset: 0px 41px">
            <div
              class="uni-swiper-slide-frame"
              style="
                width: 100%;
                height: 100%;
                transform: translate(0%, 0px) translateZ(0px);
              "
            >
              <van-swipe :loop="true" :width="310" @change="onChange">
                <van-swipe-item v-for="(image, index) in images" :key="index">
                  <div>
                    <div></div>
                    <img style="width: 294px; height: 500px" :src="image" />
                    <div></div>
                  </div>
                </van-swipe-item>
              </van-swipe>
            </div>
          </div>
        </div>
      </div>
      <div share class="share-btn" @click="shareShow = true">SHARE</div>
      <van-popup
        v-model="shareShow"
        position="bottom"
        :style="{ height: '100px' }"
      >
        <div  class="share-body">
          <div  class="share-item" v-for="(item,index) in shares" :key="index">
            <div  class="shar-icon">
              <div
                
                
                class="u-icon u-icon--right"
                v-html="item.icon"
                >
                
              
                
                </div
              >
            </div>
            <div  class="share-name">{{item.name}}</div>
          </div>
          
         
        </div>
      </van-popup>
    </div>
  </div>
</template>

<script>
export default {
  name: "share",

  data() {
    return {
      shares:[
        {
          name:"IMAGE",
         
          icon:` <span style="
                    font-size: 28px;
                    line-height: 28px;
                    font-weight: normal;
                    top: 0px;
                    
                  " class="icon iconfont image">&#xe7de;</span>`,
        },
        {
          name:"LINK",
          icon:` <span style="
                    font-size: 28px;
                    line-height: 28px;
                    font-weight: normal;
                    top: 0px;
                    
                  " class="icon iconfont image">&#xe7de;</span>`,
        
        },
        {
          name:"FACEBOOK",
        
           icon:` <span style="
                    font-size: 28px;
                    line-height: 28px;
                    font-weight: normal;
                    top: 0px;
                    
                  " class="icon iconfont image">&#xe620;</span>`,
        },{
          name:"TWITTER",
          icon:` <span style="
                    font-size: 28px;
                    line-height: 28px;
                    font-weight: normal;
                    top: 0px;
                    
                  " class="icon iconfont image">&#xe882;</span>`,
          
        }
      ],
      shareShow: false,
      show: false,
      selectImg: "/static/img/main/1.6e9df292.png",
      withdrawAmount: undefined,
      images: [
        "/static/img/main/1.6e9df292.png",
        "/static/img/main/2.d3756f08.png",
        "/static/img/main/3.475b8bcc.png",
      ],
      bankOpts: [
        {
          field: "Name of payees",
        },
        {
          field: "Receiving bank account",
        },
        {
          field: "Routing Code",
        },
        {
          field: "SWIFT Code",
        },
        {
          field: "Recipient bank",
        },
        {
          field: "Bank address",
        },
      ],
      form: {
        name: "",
        banckAccount: "",
        routingCode: "",
        swiftCode: "",
        repBank: "",
        bankAddr: "",
      },
    };
  },
  methods: {
    onChange(index) {
      this.selectImg = this.images[index];
    },
    goBack() {
      this.$router.go(-1);
    },
    submit() {
      this.show = true;
      // Dialog.alert({
      //   title: "Tips",
      //   message: "Withdrawal amount error",
      // }).then(() => {
      //   // on close
      // });
    },
  },
};
</script>

<style lang="scss" scoped>
.share {
  color: var(--text-color);
  box-sizing: border-box;
  .page-head {
    height: 52px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-left: 0;
    padding-right: 41px;
    font-size: 14px;
    font-weight: 400;
    color: var(text-color);
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9;
    right: 0;
    padding-top: calc(0px);
    .back-content {
      width: 41px;
      height: 41px;
      display: flex;
      justify-content: center;
      align-items: center;
      .back {
        font-size: 22px;
      }
    }
    .page-head-title {
      font-size: 16px;
      font-weight: 500;
      margin: auto;
    }
  }
  .page-bc {
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
  }
  .page-content {
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: var(--main-bc-opacity);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    padding-top: 45px;
    box-sizing: border-box;
    .uni-swiper-wrapper {
      overflow: hidden;
      position: relative;
      width: 100%;
      height: 100%;
      -webkit-transform: translateZ(0);
      transform: translateZ(0);
      .uni-swiper-slide-frame {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        will-change: transform;
        .uni-swiper-item {
          display: block;
          overflow: hidden;
          will-change: transform;
          position: absolute;
          width: 100%;
          height: 100%;
          cursor: grab;
        }
      }
    }
    .swiper-content {
      width: 100%;
      height: 499px;
    }
    .share-btn {
      width: 291px;
      height: 45px;
      border-radius: 45px;
      display: flex;
      justify-content: center;
      align-items: center;
      color: #fff;
      background-color: #00dcab;
      margin: auto;
      margin-top: 26px;
      margin-bottom: 0;
    }
  }

  .share-body {
    width: 100%;
    height: 100px;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: var(--content-bc);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    .share-item {
      flex: 1;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      text-decoration: none;
      color: var(--text-color);
      .share-name {
        text-transform: uppercase;
        font-size: 13px;
        opacity: 0.7;
        margin-top: 8px;
      }
    }
  }
}
</style>


.<style lang="scss">
.share {
  .van-popup {
    background: var(--content-bc) !important;
    border-top-left-radius: 10px !important;
    border-top-right-radius: 10px !important;
  }
  .van-swipe__indicators {
    display: none;
  }
  .van-dialog {
    background: var(--content-bc);
    color: var(--text-color);
    .content {
      text-align: center;
      /* width: 131px; */
      margin: o auto;
      margin: 0 auto;
    }
  }
  .van-dialog__confirm,
  .van-dialog__confirm:active {
    background: var(--content-bc);
    color: var(--text-color);
  }
  .box {
    // width: 450px;
    background: #fff;
    // padding: 30px;
    // box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 0 0 0 5px;
    background: var(--conten-bc);
  }

  .box .input_data {
    height: 30px;
    width: 100%;
    position: relative;
    margin-top: 10px;
  }

  .box .input_data input {
    display: block;
    height: 100%;
    width: 100%;
    border: none;
    // font-size: 16px;
    // border-bottom: 2px solid silver;
    background: var(--content-bc);
    color: var(--text-color);
    font-size: 12px;
  }

  .input_data input:focus,
  .input_data input:valid {
    outline: 0;
    // border-bottom-color: #4158d0;
  }

  .input_data input:focus ~ label,
  .input_data input:valid ~ label {
    transform: translateY(-12px);
    font-size: 12px;
    color: grey;
  }

  .box .input_data label {
    position: absolute;
    bottom: 10px;
    left: 0;
    color: grey;
    pointer-events: none;
    transition: all 0.3s ease;
  }

  .vs-input {
    margin: 5px;
    margin-top: 20px;
  }
  .van-cell {
    background: var(--content-bc);
    border-bottom: 1px solid hsla(0, 0%, 50.2%, 0.8);
  }
  .van-field__label {
    color: var(--text-color);
    font-size: 22px;
    width: 20px;
  }
  .van-field__control {
    color: var(--text-color);
    font-size: 27px;
  }
  .van-field__control::-webkit-input-placeholder {
    /* WebKit browsers */
    color: #999;
  }
}
</style>